Source for file SC_Display.php
Documentation is available at SC_Display.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* @author Ryuichi Tokugami
* @version $Id: SC_Display.php 20970 2011-06-10 10:27:24Z Seasoft $
* TODO php4を捨てたときに ここのコメントアウトを外してね。
// TODO SC_SiteSession で実装した方が良さげ
$objCartSess = new SC_CartSession_Ex();
$objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
* LC_Page のパラメーターを, テンプレートに設定し, 出力の準備を行う.
* @param LC_Page $page LC_Page インスタンス
* @param $is_admin boolean 管理画面を扱う場合 true
function prepare($page, $is_admin = false){
$device = ($is_admin) ? DEVICE_TYPE_ADMIN : $this->detectDevice();
$this->response->setResposeBody($this->view->getResponse($page->getTemplate()));
* SC_Response::reload() のラッパーです.
function reload($queryString = array(), $removeQueryString = false){
$this->response->reload($queryString, $removeQueryString);
$this->response->addHeader($name, $value);
* デバイス毎の出力方法を自動で変更する、ファサード
* Enter description here ...
function setDevice($device = DEVICE_TYPE_PC){
$this->response->setContentType("text/html");
$this->setView(new SC_MobileView_Ex());
case DEVICE_TYPE_SMARTPHONE:
$this->setView(new SC_SmartphoneView_Ex());
$this->setView(new SC_SiteView_Ex());
$this->setView(new SC_AdminView_Ex());
* SC_Display::MOBILE = ガラケー = 1
* SC_Display::SMARTPHONE = スマホ = 2
* SC_Display::PC = PC = 10
$nu = new Net_UserAgent_Mobile();
$su = new SC_SmartphoneUserAgent_Ex();
return DEVICE_TYPE_MOBILE;
} elseif ($su->isSmartphone()) {
return DEVICE_TYPE_SMARTPHONE;
$this->view->assign($val1, $val2);
$this->view->assignobj($obj);
$this->view->assignarray($array);
Documentation generated on Fri, 24 Feb 2012 14:02:32 +0900 by Seasoft
|